package com.cskaoyan.mapper;

import com.cskaoyan.bean.bo.AdvertiseUpdateBo;
import com.cskaoyan.bean.param.BaseParam;
import com.cskaoyan.bean.po.AdvertisePo;
import com.cskaoyan.bean.vo.AdvertiseVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * mapper 文件
 *
 * @author: 陈慧颖
 * @time: Created by chy on 2022/6/3 21:00
 */

public interface AdvertiseMapper {
    List<AdvertisePo> queryAll(@Param("baseParam") BaseParam baseParam, @Param("name") String name, @Param("content") String content);

    /**
     * 查询数据库中,所有广告数量
     *
     * @return
     */
    int queryAllCount();

    int insertOne(@Param("advertisePo") AdvertisePo advertisePo);

    /**
     * 更新某一项广告
     *
     * @param advertisePo
     * @return
     */

    int updateOneAdvertise(@Param("advertisePo") AdvertisePo advertisePo);

    /**
     * 使用注解将参数强行命名为advertiseUpdateBo   --- >advertiseUpdatePo
     *
     * @param advertiseUpdateBo
     * @return
     */
    int deleteOne(@Param("advertiseUpdatePo") AdvertiseUpdateBo advertiseUpdateBo);

}
